//
//  MainAccountPopViewCell.swift
//  d11
//
//  Created by peale on 2018/9/19.
//  Copyright © 2018年 Tech_001. All rights reserved.
//

import UIKit

class MainAccountPopViewCell: UITableViewCell {
    var titleLabel : UILabel?
     var lineView : UIView?
    override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
        super.init(style: style, reuseIdentifier: reuseIdentifier)
        self.setUpUI()
    }
    
    required init?(coder aDecoder: NSCoder) {
        super.init(coder: aDecoder)
    }
    
    func setUpUI() -> Void {
        self.backgroundColor  = UIColor.clear
        self.titleLabel = UILabel.init()
        self.titleLabel?.textColor = HexRGBAlpha(0x333333, 1)
        self.titleLabel?.font = UIFont.systemFont(ofSize: 15)
        self.titleLabel?.textAlignment = NSTextAlignment.center
        self.titleLabel?.numberOfLines = 1
        self.contentView.addSubview(self.titleLabel!)
        self.titleLabel?.snp.makeConstraints{(make) in
            make.width.equalToSuperview()
            make.height.equalTo(44)
            make.centerY.equalToSuperview()
        }
        
        self.lineView = UIView.init()
        self.lineView?.backgroundColor = HexRGBAlpha(0xF7F8F8, 1)
        self.contentView.addSubview(self.lineView!)
        
        self.lineView?.snp.makeConstraints{(make) in
            make.centerX.equalToSuperview()
            make.width.equalToSuperview()
            make.height.equalTo(0.7)
            make.bottom.equalToSuperview()
        }
    }
    func setData(dict:[String:Any]?,isSelect:Bool) -> Void {
        self.titleLabel?.text = dict?["name"] as? String
        if  isSelect {
            self.titleLabel?.textColor =  HexRGBAlpha(0xFCD199, 1)
        }else{
            self.titleLabel?.textColor = HexRGBAlpha(0x333333, 1)
        }
    }
}
